import Taro, { Component, Config } from '@tarojs/taro'
import { WebView } from '@tarojs/components'
// import './index.scss'

export default class Index extends Component {
  state: any
  config: Config = {
    navigationBarTitleText: ''
  }

  constructor() {
    super(...arguments)
    this.state = {
      url: ''
    }
  }

  componentWillMount() {
    this.setState({
      url: this.$router.params.url
    })
  }

  render() {
    const {url} = this.state
    return (<WebView src={url} />)
  }
}
